| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkAstraeus::EnvironmentRenderer Class Referencefinal

Utility class helping with environment rendering such as cube maps or spherical maps. More...

## Public Member Functions
| EnvironmentRenderer (System *system) noexcept
| ~EnvironmentRenderer ()
void | renderCubemap (nkGraphics::Texture *output, nkGraphics::Shader *shader, unsigned int targetDimensions, nkGraphics::FORMAT targetFormat)
void | cubemapToSphericalMap (nkGraphics::Texture *output, nkGraphics::Texture *input, unsigned int targetWidth, unsigned int targetHeight)

## Detailed Description

Utility class helping with environment rendering such as cube maps or spherical maps.

## Constructor & Destructor Documentation

## ◆ EnvironmentRenderer()

nkAstraeus::EnvironmentRenderer::EnvironmentRenderer | ( | System * | system | ) |
| noexcept

Constructor.

Parameters

  system | The system the instance should live in.

## ◆ ~EnvironmentRenderer()

nkAstraeus::EnvironmentRenderer::~EnvironmentRenderer | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ renderCubemap()

void nkAstraeus::EnvironmentRenderer::renderCubemap | ( | nkGraphics::Texture * | output,
|  | nkGraphics::Shader * | shader,
|  | unsigned int | targetDimensions,
|  | nkGraphics::FORMAT | targetFormat
| ) |  |

Renders the given shader, into a cube map. The shader will be used 6 times as a post processing pass with properly setup cameras to render each face. The resulting texture can then be used as an enviromnent map with other materials or effects.

Parameters

  output | The texture to render to, which will be setup and loaded automatically by the method.
  shader | The shader to use to render each face.
  targetDimensions | The target dimensions (width and height) the output texture will be setup with.
  targetFormat | The target format the output texture will be setup with.

## ◆ cubemapToSphericalMap()

void nkAstraeus::EnvironmentRenderer::cubemapToSphericalMap | ( | nkGraphics::Texture * | output,
|  | nkGraphics::Texture * | input,
|  | unsigned int | targetWidth,
|  | unsigned int | targetHeight
| ) |  |

Converts a cube map, into a single texture, spherical map.

Parameters

  output | The texture to render to, which will be setup and loaded automatically by the method.
  input | The input cube map to render.
  targetWidth | The target width for the output texture.
  targetHeight | The target height for the output texture.

Remarks
  The output texture will take the format and gamma correction setting of the input texture.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsAstraeus/Graphics/Utils/EnvironmentRenderer.h